<script>
<!--
var sort_by = '';
var sort_order = 0;
var current_view = '';
var page = 1;

function listReload(page)
{
    $('#indexAjax').html('<div align="center"><div class="loader_admin"></div></div>');
    $('#indexAjax').load('<?php echo url_for('@cms_category_edit?cms_category_id='.$cms_category->cms_category_id) ?>&'+$('#filterSearch').serialize(), {
        sort_by:      sort_by,
        sort_order:   sort_order,
        page:         page,
        view:         current_view,
    });
}

-->
</script>
<h1>Danh mục</h1>
<div id="EditCmsCategoryForm" class='backend_form'>
  <form id="editCmsCategory" action="<?php echo url_for('@cms_category_edit?cms_category_id='.((isset($cms_category))?($cms_category->cms_category_id):"").''); ?>" method="post">
    <table>
      <?php echo $cms_category_form['parent_id']->renderRow();  ?>
      <?php echo $cms_category_form['name']->renderRow();  ?>
      <?php echo $cms_category_form['position']->renderRow();  ?>
      <?php echo $cms_category_form['_csrf_token'];  ?>
      <tr><td colspan="2" style="text-align:center">
      	<input type='reset' value='Reset' />
        <input  id="fs" type="submit" value="<?php echo "Save" ?>"/>
		<?php if (isset($status) && $status == false) :?>
			<div></span>Danh mục đã tồn tại</span></div>
            <script>
                    window.location.href = document.location.href;
            </script>
		<?php endif ?>
      </td></tr>
    </table>
  </form>
</div>
<div style='padding-top:10px;'>
<div class="UITable">
  <div id="indexAjax" class='filter_form'>
    <?php include 'categoryListAjax.php' ?>
  </div>
</div>
</div>